<%@page import="doantotnghiep.modelDTO.PurchaseOrderDTO"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.awt.Button"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@page import="java.util.ArrayList"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Quản lý phiếu nhập hàng</title>

<script type="text/javascript">
	$(function() {
		$("#searchorderDateKey").datepicker();
	});
</script>
</head>
<body>
	<% HashMap<String, Object> exportModel = (HashMap<String, Object>) request.getAttribute("exportModel");
	   float tong=0;
 		%>
	<br>
	<br>
	<br>

	<h1 style="color: blue;">LẬP PHIẾU XUẤT HÀNG</h1>
	
	<div align="center">
		
			
			<input style="font-size: 15px ;font-style: italic; color: silver;" type="text" id = "searchorderDateKey" placeholder="Chọn ngày để tìm kiếm"/>
			<span id="purchase-error" style="color:red"> </span>
	
			
					<input id="selectorderdate" type="button" value="Tìm" />
			
				<h1 style="color: blue;">DANH SÁCH ĐƠN ĐẶT HÀNG CHƯA XUẤT KHO</h1>
					<table class="table1" id="purchasetable">
						<tr>
							<th scope="col" abbr="Starter">Mã đơn đặt hàng</th>
							<th scope="col" abbr="Starter">Ngày Đặt Hàng</th>
							<th scope="col" abbr="Starter">Ngày giao hàng</th>
							<th scope="col" abbr="Starter">Nơi giao hàng</th>
							<th scope="col" abbr="Starter">Nhân viên lập đơn</th>
							<th scope="col" abbr="Starter">Khách hàng</th>
							<th scope="col" abbr="Starter">Chi tiết</th>
							<th scope="col" abbr="Starter"></th>
						</tr>

						<c:forEach items="${exportModel.purchaseOrderDTOs}" var="purchase"
							varStatus="status">
							<tr class="<c:if test="${status.count % 2 == 0}">even</c:if>">
								<td>${purchase.orderID}</td>
								<td>${purchase.orderedDate}</td>
								<td>${purchase.deliveryDate}</td>
								<td>${purchase.deliveryLocation}</td>
								<td>${purchase.staffName}</td>
								<td>${purchase.customerName}</td>
								<td><a
									href="#" onclick="detailPurchase(${purchase.orderID})"> <img src="<c:url value="/resources/images/detail.jpg"/>"/></a></td>
																<td><a
									href="#" onclick="selectPurchase(${purchase.orderID})"> <img src="<c:url value="/resources/images/select.jpg"/>"/></a></td>
						
								
						</c:forEach>
						
						
					</table>
					 <div id="purchasepaging"></div> 
					<script type="text/javascript">
						var pager = new Pager('purchasetable', 7);
						pager.init();
						pager.showPageNav('pager', 'purchasepaging');
						pager.showPage(1);
					</script>
					</div>
			

</body>
</html>